oracle.pgx.api

## Class PgxFuture<T>

- java.lang.Object
- - <any>
  - - oracle.pgx.api.PgxFuture<T>

-     public class PgxFuture<T>
      extends <any>

  A PGX-specific extension of `CompletableFuture`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PgxFuture()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> PgxFuture<Void>` | `allOf(List<PgxFuture<T>> promises)`
    `boolean` | `cancel()`
    `PgxFuture<T>` | `cancelOn(PgxFuture promise)` If given promise completes exceptionally because it was canceled, `cancel()` gets called on this promise as well.
    `static <T> PgxFuture<T>` | `completedFuture(T arg)`
    `static <T> PgxFuture<T>` | `exceptionallyCompletedFuture(Throwable th)`
    `PgxFuture<Void>` | `thenAccept(<any> block)`
    `<U> PgxFuture<U>` | `thenApply(<any> fn)`
    `PgxFuture<T>` | `thenComplete(PgxFuture<T> promise)` completes the given promise whenever this completes.
    `PgxFuture<T>` | `thenComplete(PgxFuture<T> promise, Runnable cleanup)` completes the given promise whenever this completes.
    `<U> PgxFuture<U>` | `thenCompose(<any> fn)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PgxFuture

          public PgxFuture()

  - ### Method Detail

    - #### allOf

          public static <T> PgxFuture<Void> allOf(List<PgxFuture<T>> promises)

    - #### cancel

          public boolean cancel()

    - #### cancelOn

          public PgxFuture<T> cancelOn(PgxFuture promise)

      If given promise completes exceptionally because it was canceled, `cancel()` gets called on this promise as well.
      Parameters:
        `promise` - If given promise completes exceptionally because it was canceled, `cancel()` gets called on this promise as well. If given promise completes exceptionally (regardless of the causing exception) and this promise has started or is done, `rollback()` gets called on this promise.
      Returns:
        this

    - #### completedFuture

          public static <T> PgxFuture<T> completedFuture(T arg)

    - #### exceptionallyCompletedFuture

          public static <T> PgxFuture<T> exceptionallyCompletedFuture(Throwable th)

    - #### thenAccept

          public PgxFuture<Void> thenAccept(<any> block)

    - #### thenApply

          public <U> PgxFuture<U> thenApply(<any> fn)

    - #### thenComplete

          public PgxFuture<T> thenComplete(PgxFuture<T> promise)

      completes the given promise whenever this completes. If this completes exceptionally, the given promise is completed exceptionally as well.
      Parameters:
        `promise` - the promise
      Returns:
        the pgx future

    - #### thenComplete

          public PgxFuture<T> thenComplete(PgxFuture<T> promise,
                                  Runnable cleanup)

      completes the given promise whenever this completes. If this completes exceptionally, the given promise is completed exceptionally as well.
      Parameters:
        `promise` -
        `cleanup` - to be run upon completion (can be null)
      Returns:
        the given promise

    - #### thenCompose

          public <U> PgxFuture<U> thenCompose(<any> fn)

Copyright © 2015. All rights reserved.